package myLesson3;

public class LongestSeq {
	public static void main(String[] args) {
		int[] a={1,1,1,2,2,2,2,3,3,3};
		int c=1;
		int max=0;
		System.out.print(c);
		for(int i=1;i<a.length;i++){
			if(a[i]==a[i-1]){
				c++;
			}
			else{
				c=1;
			}
			if(c>max){
				max=c;
			}
			System.out.print(" "+c);
		}
		System.out.print("\tmax "+max);
	}
}
